#
# qmake project file for QtWi
#
# (C) 2009 Ultratronik Entwicklungs GmbH
# 	- License: GPL
# 	- Author: Soeren Wellhoefer <soeren.wellhoefer@gmx.net>
#

# General

VERSION = 0.1
TEMPLATE = app
CONFIG = qt debug
TARGET = ultrabench

# Cross-compilation

ARCH = $$(ARCH)
contains(ARCH, mips) {

# Compiler/linker settings
QMAKE_CXX = mipsel-linux-g++
QMAKE_CC = mipsel-linux-gcc
QMAKE_LINK = mipsel-linux-g++
QMAKE_LINK_SHLIB = mipsel-linux-g++

# Paths
#INCLUDEPATH =  

}

# Defines

DEFINES *= $$(APPKIND)

isEmpty(DEFINES) {
	error(Environment variable APPKIND must be defined as QTWI_QT or QTWI_TNW)
}

DBG = $$(DEBUG)
contains(DBG, YES) {
	DEFINES *= DEBUG
	QMAKE_CXXFLAGS *= -O0 -Wall --debug -g
}

VSNDIP = $$(SNDIP)

count(VSNDIP, 1) {
	DEFINES *= SNDIP=\"\\\"$$(SNDIP)\\\"\"
}

VRECIP = $$(RECIP)

count(VRECIP, 1) {
	DEFINES *= RECIP=\"\\\"$$(RECIP)\\\"\"
}

DEFINES *= ULTRABENCH_VERSION=$$VERSION

# Includes/Libs

DEPENDPATH += . src
INCLUDEPATH += src
LIBS = -lclasslib -ltnW -lnano-X -lmwengine -lmwdrivers -lmxml -lmwfonts -lfreetype -lqtwi

# Files

HEADERS += src/transfer.hpp src/items.hpp src/common.hpp src/aux.hpp src/gauges.hpp src/net.hpp

SOURCES += src/transfer.cpp src/constants.cpp src/common.cpp src/ultrabench.cpp src/items.cpp src/aux.cpp src/gauges.cpp src/net.cpp

# Installation

INSTDIRECT=$$(INSTALL)
isEmpty(INSTDIRECT) {
	INSTDIRECT = /usr/
}

target.path = $$INSTDIRECT/bin
INSTALLS *= target
